﻿package me.zhengjie.common.annotation

import me.zhengjie.common.aspect.LimitType

/**
 * @author Kuki
 * @Date 2024/11/10
 */
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
@Retention(
    AnnotationRetention.RUNTIME
)
annotation class Limit( // 资源名称，用于描述接口功能
    val name: String = "",  // 资源 key
    val key: String = "",  // key prefix
    val prefix: String = "",  // 时间的，单位秒
    val period: Int,  // 限制访问次数
    val count: Int,  // 限制类型
    val limitType: LimitType = LimitType.CUSTOMER
)